home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
batch
/
dskchk.zip
/
DSKCHK.DOC
< prev
Wrap
Text File
|
1991-01-26
|
2KB
|
48 lines
______DSKCHK Ver. 1.00
Purpose: Batch file utility to detect existence and functioning of disk
drive; is there a drive, has it a formatted readable disk & (op-
tionally) can it be written to?
Format: DSKCHK [d] [/W]
_ d is any legal drive letter; if no drive specified, the default
drive is tested.
__ /W forces an attempt to write if the disk is readable.
Remarks: Result of test is reported in ERRORLEVEL:
0 = No error. Drive exists and disk can be read. If /W
switch was used, disk can also be written to.
1 = Disk cannot be read.
2 = Disk can be read but not written to. This report can
appear only if /W switch is used.
255 = User has bungled the drive letter (by calling for
drive % or some such).
Notes: DskChk tests availability of the disk by executing an INT 25h
read. This interrupt does not trip the normal Critical Error
Handler ("Abort, Retry... ") and returns reasonably speedily.
When /W switch is used, an attempt is made using INT 21h, AH=3Ch.
If successful, this interrupt creates a 0-byte file ISSUDERE.$$$
in the root directory, and DskChk then deletes the file. In case
of failure, a temporary Critical Error Handler is used to speed
the return and prevent "Abort, Retry...." Such a failure produces
ErrorLevel 2 and normally means means the disk is write-protected,
but it could also be produced by a full root directory. A full
disk wouldn't produce the error.
A word of caution: there are a lot of ways of hooking a disk drive
to a PC, and some of them won't respond to DskChk correctly. One
I know about is MicroSolutions' CompatiCard.
R. N. Wisan, January, 1991
37 Clinton St., Oneonta, NY 13820